<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <!--适应移动设备-->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>简洁搜索</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
</head>

<body>
    <div class="container mt-3">
		<nav aria-label="breadcrumb">
		  <ol class="breadcrumb">
			<li class="breadcrumb-item active"><a href="#">Pure search</a></li>
			<li class="breadcrumb-item"><a href="./pages/AssessmentList.html">Assessment List</a></li>
			<li class="breadcrumb-item"><a href="/pages/Assessment-08-2020.html">August Assessment</a></li>
			<!-- <li class="breadcrumb-item active" >Data</li> -->
		  </ol>
		</nav>
		
        <div>
            <h1 class="text-center">Pure search</h1>
        </div>


        <div id="zhihu" class="input-group mb-3 mt-5">
            <div class="input-group-prepend">
                <span class="input-group-text">知乎</span>
            </div>
            <input type="text" class="form-control" id="zhihuQueryKy"></input>
            <button id="zhihuQueryBtn" class="btn btn-outline-primary border-0" onclick="searchZhihu()">提交</button>
        </div>

		<!-- bilibili PC -->
        <div id="biliPC" class="input-group mt-3">
            <div class="input-group-prepend">
                <span class="input-group-text">哔哩哔哩PC
                    端
                </span>
            </div>
            <input id="biliPCQueryKy" type="text" class="form-control" />
            <button id="biliPCQueryBtn" type="button" class="btn btn-outline-primary border-0 "
                onclick="searchBiliPC()">提交</button>
        </div>

		<!-- bilibili Phone -->
        <div id="biliPhone" class="input-group mt-3">
            <div class="input-group-prepend">
                <span class="input-group-text">哔哩哔哩移动端
                </span>
            </div>
            <input id="biliPhoneQueryKy" type="text" class="form-control" />
            <button id="biliPhoneQueryBtn" type="button" class="btn btn-outline-primary border-0 "
                onclick="searchBiliPhone()">提交</button>
        </div>
		
		
		
		<!-- 卡片组 -->
		<div class="row">
		<div class="col-sm-4">
		<div class="card mt-3">
			<div class="card-body">
				 <h5 class="card-title">快速访问</h5>
			</div>
			<!-- Personal space -->
		 <li class="list-group-item">
			 <div>个人中心入口</div>
			<div class="btn-toolbar">
				<!-- bilibili -->
				<div id="biliSpace" class="btn-group mr-1 mt-3">
					<button id="biliSpaceBtn" type="button" onclick="enterBiliSpace()" class="btn btn-danger border-0">哔哩哔哩个人收藏</button>
				</div>
				<!-- zhihu -->
				<div id="zhihuSpace" class="btn-group mt-3">
					<button id="zhihuSpaceBtn" type="button" onclick="enterZhihuSpace()" class="btn btn-primary">知乎个人主页</button>
				</div>
			</div>
		</li>
		
		<!-- bilibili up space -->
		<li class="list-group-item">
		<div class="dropdown mt-3">
		  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
		    哔哩哔哩up主空间（学习相关）
		  </button>
		  <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
		    <a class="dropdown-item" href="https://space.bilibili.com/8695736/">田浅浅</a>
			<a class="dropdown-item" href="https://space.bilibili.com/79577853/">智能路障（读书）</a>
			<a class="dropdown-item" href="https://space.bilibili.com/344849038/">YJango（学习观）</a>
			<div class="dropdown-divider"></div>
		    <a class="dropdown-item" href="https://space.bilibili.com/474269181/">花生酱啦呜（经济学人解读）</a>
			<a class="dropdown-item" href="https://space.bilibili.com/88461692/">3Blue1Brown（数学）</a>
			
			<div class="dropdown-divider"></div>
			<a class="dropdown-item" href="https://space.bilibili.com/27948784/">杨中科（英语学习网站）</a>
			<a class="dropdown-item" href="https://space.bilibili.com/31273057/ ">free-coder（编程科普）</a>
			<a class="dropdown-item" href="https://space.bilibili.com/24014925/ ">正月点灯笼（数据结构/算法）</a>
			<div class="dropdown-divider"></div>
			<a class="dropdown-item" href="https://space.bilibili.com/42861238/ ">玛拉快跑</a>
		  </div>
		</div>
		</li>
		<!-- </div> -->
		</div>
		</div>
		
	  </div>
	</div>


    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        /* bind 'enter' key*/
        $('#zhihuQueryKy').bind('keyup', function (event) {
            if (event.keyCode == "13") {
                $('#zhihuQueryBtn').click();
            }
        });

        $('#biliPCQueryKy').bind('keyup', function (event) {
            if (event.keyCode == "13") {
                $('#biliPCQueryBtn').click();
            }
        });

        $('#biliPhoneQueryKy').bind('keyup', function (event) {
            if (event.keyCode == "13") {
                $('#biliPhoneQueryBtn').click();
            }
        });

		/* search function */
        // search function
        function searchBiliPC() {
            var keyword = document.getElementById("biliPCQueryKy");
            var url = "https://search.bilibili.com/all?keyword="
            window.open(url + keyword.value)
        }

        function searchBiliPhone() {
            var keyword = document.getElementById("biliPhoneQueryKy");
            var url = "https://m.bilibili.com/search?keyword="
            window.open(url + keyword.value)
        }


        function searchZhihu() {
            var keyword = document.getElementById("zhihuQueryKy");
            var url = "https://www.zhihu.com/search?type=content&q="
            window.open(url + keyword.value)
        }
		
		/* personal space */
		// bili space
		function enterBiliSpace() {
			var url = "https://space.bilibili.com/385563884/favlist";
			window.open(url);
		}
		
		// zhihu space
		function enterZhihuSpace() {
			var url = "https://www.zhihu.com/people/yllyandy";
			window.open(url);
		}
    </script>
    

</body>

</html>
